<template>
  <div class="w-1000px m-auto mt-20px mb-10px">
    <Descriptions bordered :column="1" :labelStyle="{ width: '200px', textAlign: 'right' }">
      <template #title>
        <div style="text-align: center"> 许可证信息 </div>
      </template>
      <DescriptionsItem label="授权单位"> {{ dataRef.company }} </DescriptionsItem>
      <DescriptionsItem label="使用单位"> {{ dataRef.name }} </DescriptionsItem>
      <DescriptionsItem label="企业号">
        {{ dataRef.enterpriseNum ? dataRef.enterpriseNum : dataRef.name }}
      </DescriptionsItem>
      <DescriptionsItem label="用户数"> {{ dataRef.userCount }} </DescriptionsItem>
      <DescriptionsItem label="类型">
        {{ dataRef.type == 'commercial' ? '免费版' : dataRef.type }}
      </DescriptionsItem>
      <DescriptionsItem label="到期时间">
        {{ dataRef.expiresDate ? dayjs(dataRef.expiresDate).format('YYYY-MM-DD') : '' }}
      </DescriptionsItem>
      <DescriptionsItem label="域名"> {{ dataRef.domain }} </DescriptionsItem>
      <DescriptionsItem label="版本"> {{ dataRef.versionType }} </DescriptionsItem>
      <!-- <DescriptionsItem label="流程最大节点数"> {{ dataRef.actionCount }} </DescriptionsItem> -->
      <DescriptionsItem label="试用版"> {{ dataRef.trial ? '是' : '否' }} </DescriptionsItem>
      <!-- <DescriptionsItem label="流程设计器">
        {{ dataRef.flowDesigner == '0' ? 'A版（仅可在IE下设计）' : 'X版' }}
      </DescriptionsItem> -->
      <DescriptionsItem label="系统版本"> {{ dataRef.version }} </DescriptionsItem>
      <DescriptionsItem label="补丁版本"> </DescriptionsItem>
      <DescriptionsItem label="类别">
        {{ dataRef.category == 'cloud' ? '登云版' : '本地版' }}
      </DescriptionsItem>
    </Descriptions>
  </div>
</template>
<script lang="ts" setup>
  import { ref, onMounted } from 'vue';
  import { Descriptions } from 'ant-design-vue';
  const DescriptionsItem = Descriptions.Item;
  import { getAdminLicensePage } from '/@/api/system/system';
  import { dateUtil as dayjs } from '/@/utils/dateUtil';
  const dataRef = ref<Recordable>({});
  const fetch = async () => {
    dataRef.value = await getAdminLicensePage();
  };
  onMounted(fetch);
</script>
<style lang="less" scoped>
  :deep(.ant-progress-inner) {
    border-radius: 0;
  }
</style>
